function get_file_prop_from_url(url) {
  var index = url.lastIndexOf('/');
  var type = url.substring(index + 1);
  var name = url.substring(1, index);

  return {
    'name': name,
    'new_type': type
  };
}

function sleep(milliSeconds) {
  var startTime = new Date().getTime();
  while (new Date().getTime() < startTime + milliSeconds);
}

exports.get_file_prop_from_url = get_file_prop_from_url;
exports.sleep = sleep;
